Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

205
Vistas
After migrating to yarn 3 workspace "Cannot use import statement outside a module" running react-scripts test

I have a repository with yarn 3 workspaces and a CRA front end located in /packages/client

yarn workspace client start successfully launches the development app on port 3000.

The test suite ran correctly before moving the client to the packages folder and setting up the yarn workspace. I have made no changes to the client's package.json.

Running yarn workspace client test gives:

Error: Failed to initialize watch plugin "../../.yarn/__virtual__/jest-watch-typeahead-virtual-2d80f0ed7c/0/cache/jest-watch-typeahead-npm-1.0.0-0c228b0e38-388d518974.zip/node_modules/jest-watch-typeahead/build/file_name_plugin/plugin.js":

  ● Test suite failed to run

    /Users/bob/monorepo/.yarn/__virtual__/jest-watch-typeahead-virtual-2d80f0ed7c/0/cache/jest-watch-typeahead-npm-1.0.0-0c228b0e38-388d518974.zip/node_modules/jest-watch-typeahead/build/file_name_plugin/plugin.js:1

import { Prompt } from 'jest-watcher';
    ^^^^^^

    SyntaxError: Cannot use import statement outside a module

      28077 |     try {
      28078 |       module.isLoading = true;
    > 28079 |       module.load(modulePath);
            |              ^
      28080 |       hasThrown = false;
      28081 |     } finally {
      28082 |       module.isLoading = false;

      at Function.external_module_.Module._load (../../.pnp.cjs:28079:14)
about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda